#ifndef FORTRESS_EVENTHANDLER_H
#define FORTRESS_EVENTHANDLER_H
#include <string>
namespace fortress
{
	enum playerEvents
	{
		event_move,
		event_quit,
		event_open, 
		event_close, 
		event_pickup, 
		event_drop,
		event_stairs,
		event_inventory,
		event_attack,

		event_death
	};

	enum moveDirections
	{
		m_north,m_northeast,m_east,m_southeast,m_south,m_southwest,m_west,m_northwest,m_invalid
	};

	class eventDispatch
	{
	private:
		eventDispatch();
		eventDispatch(const eventDispatch &);				// undefined
		eventDispatch & operator=(const eventDispatch &);	// undefined
	public:
		eventDispatch & getInstance();
	};
	
	class eventStructure
	{
	public:
		eventStructure(){ };
		eventStructure(void * from, void * original, playerEvents setType, int setDegree, int setX, int setY):
		  sentFrom(from), originator(original), type(setType), degree(setDegree), x(setX), y(setY){ };
		// I might make this an eventListener object instead, since every object that can send/receive events should be derived from it
		void * sentFrom;		// Who is this event directly from
		void const * originator;		// Who started this chain of events
		playerEvents type;
		int degree;
		int x;
		int y;
	};

	class eventReceiver
	{

		public:
			virtual bool doEvent(eventStructure const & sent)=0;
			virtual bool exec(int, int) = 0;
			virtual void message(std::string const & message)=0;
	};
};
#endif